3.77 \(\int \frac{d+e x^n}{(a+b x^n+c x^{2 n})^2} \, dx\)

Optimal. Leaf size=362 \[ -\frac{c x \left (-b \left (d (1-n) \sqrt{b^2-4 a c}-2 a e n\right )+2 a \left (e (1-n) \sqrt{b^2-4 a c}+2 c d (1-2 n)\right )+b^2 (-(d-d n))\right ) \, _2F_1\left (1,\frac{1}{n};1+\frac{1}{n};-\frac{2 c x^n}{b-\sqrt{b^2-4 a c}}\right )}{a n \left (b^2-4 a c\right ) \left (-b \sqrt{b^2-4 a c}-4 a c+b^2\right )}-\frac{c x \left (b \left (d (1-n) \sqrt{b^2-4 a c}+2 a e n\right )+2 a \left (c d (2-4 n)-e (1-n) \sqrt{b^2-4 a c}\right )+b^2 (-d) (1-n)\right ) \, _2F_1\left (1,\frac{1}{n};1+\frac{1}{n};-\frac{2 c x^n}{b+\sqrt{b^2-4 a c}}\right )}{a n \left (b^2-4 a c\right ) \left (b \sqrt{b^2-4 a c}-4 a c+b^2\right )}+\frac{x \left (c x^n (b d-2 a e)-a b e-2 a c d+b^2 d\right )}{a n \left (b^2-4 a c\right ) \left (a+b x^n+c x^{2 n}\right )} \]

[Out]

(x*(b^2*d - 2*a*c*d - a*b*e + c*(b*d - 2*a*e)*x^n))/(a*(b^2 - 4*a*c)*n*(a + b*x^n + c*x^(2*n))) - (c*(2*a*(2*c
*d*(1 - 2*n) + Sqrt[b^2 - 4*a*c]*e*(1 - n)) - b^2*(d - d*n) - b*(Sqrt[b^2 - 4*a*c]*d*(1 - n) - 2*a*e*n))*x*Hyp
ergeometric2F1[1, n^(-1), 1 + n^(-1), (-2*c*x^n)/(b - Sqrt[b^2 - 4*a*c])])/(a*(b^2 - 4*a*c)*(b^2 - 4*a*c - b*S
qrt[b^2 - 4*a*c])*n) - (c*(2*a*(c*d*(2 - 4*n) - Sqrt[b^2 - 4*a*c]*e*(1 - n)) - b^2*d*(1 - n) + b*(Sqrt[b^2 - 4
*a*c]*d*(1 - n) + 2*a*e*n))*x*Hypergeometric2F1[1, n^(-1), 1 + n^(-1), (-2*c*x^n)/(b + Sqrt[b^2 - 4*a*c])])/(a
*(b^2 - 4*a*c)*(b^2 - 4*a*c + b*Sqrt[b^2 - 4*a*c])*n)

________________________________________________________________________________________

Rubi [A]  time = 0.63012, antiderivative size = 328, normalized size of antiderivative = 0.91, number of steps used = 4, number of rules used = 3, integrand size = 24, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.125, Rules used = {1430, 1422, 245} \[ -\frac{c x \left (-(1-n) \sqrt{b^2-4 a c} (b d-2 a e)+2 a b e n+2 a c d (2-4 n)+b^2 (-d) (1-n)\right ) \, _2F_1\left (1,\frac{1}{n};1+\frac{1}{n};-\frac{2 c x^n}{b-\sqrt{b^2-4 a c}}\right )}{a n \left (b^2-4 a c\right ) \left (-b \sqrt{b^2-4 a c}-4 a c+b^2\right )}-\frac{c x \left ((1-n) \sqrt{b^2-4 a c} (b d-2 a e)+2 a b e n+4 a c d (1-2 n)+b^2 (-d) (1-n)\right ) \, _2F_1\left (1,\frac{1}{n};1+\frac{1}{n};-\frac{2 c x^n}{b+\sqrt{b^2-4 a c}}\right )}{a n \left (b^2-4 a c\right ) \left (b \sqrt{b^2-4 a c}-4 a c+b^2\right )}+\frac{x \left (c x^n (b d-2 a e)-a b e-2 a c d+b^2 d\right )}{a n \left (b^2-4 a c\right ) \left (a+b x^n+c x^{2 n}\right )} \]

Antiderivative was successfully verified.

[In]

Int[(d + e*x^n)/(a + b*x^n + c*x^(2*n))^2,x]

[Out]

(x*(b^2*d - 2*a*c*d - a*b*e + c*(b*d - 2*a*e)*x^n))/(a*(b^2 - 4*a*c)*n*(a + b*x^n + c*x^(2*n))) - (c*(2*a*c*d*
(2 - 4*n) - b^2*d*(1 - n) - Sqrt[b^2 - 4*a*c]*(b*d - 2*a*e)*(1 - n) + 2*a*b*e*n)*x*Hypergeometric2F1[1, n^(-1)
, 1 + n^(-1), (-2*c*x^n)/(b - Sqrt[b^2 - 4*a*c])])/(a*(b^2 - 4*a*c)*(b^2 - 4*a*c - b*Sqrt[b^2 - 4*a*c])*n) - (
c*(4*a*c*d*(1 - 2*n) - b^2*d*(1 - n) + Sqrt[b^2 - 4*a*c]*(b*d - 2*a*e)*(1 - n) + 2*a*b*e*n)*x*Hypergeometric2F
1[1, n^(-1), 1 + n^(-1), (-2*c*x^n)/(b + Sqrt[b^2 - 4*a*c])])/(a*(b^2 - 4*a*c)*(b^2 - 4*a*c + b*Sqrt[b^2 - 4*a
*c])*n)

Rule 1430

Int[((d_) + (e_.)*(x_)^(n_))*((a_) + (b_.)*(x_)^(n_) + (c_.)*(x_)^(n2_))^(p_), x_Symbol] :> -Simp[(x*(d*b^2 -
a*b*e - 2*a*c*d + (b*d - 2*a*e)*c*x^n)*(a + b*x^n + c*x^(2*n))^(p + 1))/(a*n*(p + 1)*(b^2 - 4*a*c)), x] + Dist
[1/(a*n*(p + 1)*(b^2 - 4*a*c)), Int[Simp[(n*p + n + 1)*d*b^2 - a*b*e - 2*a*c*d*(2*n*p + 2*n + 1) + (2*n*p + 3*
n + 1)*(d*b - 2*a*e)*c*x^n, x]*(a + b*x^n + c*x^(2*n))^(p + 1), x], x] /; FreeQ[{a, b, c, d, e, n}, x] && EqQ[
n2, 2*n] && NeQ[b^2 - 4*a*c, 0] && ILtQ[p, -1]

Rule 1422

Int[((d_) + (e_.)*(x_)^(n_))/((a_) + (b_.)*(x_)^(n_) + (c_.)*(x_)^(n2_)), x_Symbol] :> With[{q = Rt[b^2 - 4*a*
c, 2]}, Dist[e/2 + (2*c*d - b*e)/(2*q), Int[1/(b/2 - q/2 + c*x^n), x], x] + Dist[e/2 - (2*c*d - b*e)/(2*q), In
t[1/(b/2 + q/2 + c*x^n), x], x]] /; FreeQ[{a, b, c, d, e, n}, x] && EqQ[n2, 2*n] && NeQ[b^2 - 4*a*c, 0] && NeQ
[c*d^2 - b*d*e + a*e^2, 0] && (PosQ[b^2 - 4*a*c] ||  !IGtQ[n/2, 0])

Rule 245

Int[((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[a^p*x*Hypergeometric2F1[-p, 1/n, 1/n + 1, -((b*x^n)/a)],
x] /; FreeQ[{a, b, n, p}, x] &&  !IGtQ[p, 0] &&  !IntegerQ[1/n] &&  !ILtQ[Simplify[1/n + p], 0] && (IntegerQ[p
] || GtQ[a, 0])

Rubi steps

\begin{align*} \int \frac{d+e x^n}{\left (a+b x^n+c x^{2 n}\right )^2} \, dx &=\frac{x \left (b^2 d-2 a c d-a b e+c (b d-2 a e) x^n\right )}{a \left (b^2-4 a c\right ) n \left (a+b x^n+c x^{2 n}\right )}-\frac{\int \frac{-a b e-2 a c d (1-2 n)+b^2 (d-d n)+c (b d-2 a e) (1-n) x^n}{a+b x^n+c x^{2 n}} \, dx}{a \left (b^2-4 a c\right ) n}\\ &=\frac{x \left (b^2 d-2 a c d-a b e+c (b d-2 a e) x^n\right )}{a \left (b^2-4 a c\right ) n \left (a+b x^n+c x^{2 n}\right )}-\frac{\left (c \left (2 a c d (2-4 n)-b^2 d (1-n)+\sqrt{b^2-4 a c} (b d-2 a e) (1-n)+2 a b e n\right )\right ) \int \frac{1}{\frac{b}{2}+\frac{1}{2} \sqrt{b^2-4 a c}+c x^n} \, dx}{2 a \left (b^2-4 a c\right )^{3/2} n}-\frac{\left (c \left ((b d-2 a e) (1-n)-\frac{4 a c d (1-2 n)+2 a b e n-b^2 (d-d n)}{\sqrt{b^2-4 a c}}\right )\right ) \int \frac{1}{\frac{b}{2}-\frac{1}{2} \sqrt{b^2-4 a c}+c x^n} \, dx}{2 a \left (b^2-4 a c\right ) n}\\ &=\frac{x \left (b^2 d-2 a c d-a b e+c (b d-2 a e) x^n\right )}{a \left (b^2-4 a c\right ) n \left (a+b x^n+c x^{2 n}\right )}-\frac{c \left ((b d-2 a e) (1-n)-\frac{4 a c d (1-2 n)+2 a b e n-b^2 (d-d n)}{\sqrt{b^2-4 a c}}\right ) x \, _2F_1\left (1,\frac{1}{n};1+\frac{1}{n};-\frac{2 c x^n}{b-\sqrt{b^2-4 a c}}\right )}{a \left (b^2-4 a c\right ) \left (b-\sqrt{b^2-4 a c}\right ) n}-\frac{c \left (2 a c d (2-4 n)-b^2 d (1-n)+\sqrt{b^2-4 a c} (b d-2 a e) (1-n)+2 a b e n\right ) x \, _2F_1\left (1,\frac{1}{n};1+\frac{1}{n};-\frac{2 c x^n}{b+\sqrt{b^2-4 a c}}\right )}{a \left (b^2-4 a c\right )^{3/2} \left (b+\sqrt{b^2-4 a c}\right ) n}\\ \end{align*}

Mathematica [B]  time = 1.76775, size = 1381, normalized size = 3.81 \[ \text{result too large to display} \]

Antiderivative was successfully verified.

[In]

Integrate[(d + e*x^n)/(a + b*x^n + c*x^(2*n))^2,x]

[Out]

-((x*(-((b^2 - 4*a*c)*(-b + Sqrt[b^2 - 4*a*c])*(b + Sqrt[b^2 - 4*a*c])*(1 + n)*(b^2*d + b*(-(a*e) + c*d*x^n) -
 2*a*c*(d + e*x^n))) + 2*b*c^2*Sqrt[b^2 - 4*a*c]*d*x^n*(a + x^n*(b + c*x^n))*(-((b + Sqrt[b^2 - 4*a*c])*Hyperg
eometric2F1[1, 1 + n^(-1), 2 + n^(-1), (2*c*x^n)/(-b + Sqrt[b^2 - 4*a*c])]) + (b - Sqrt[b^2 - 4*a*c])*Hypergeo
metric2F1[1, 1 + n^(-1), 2 + n^(-1), (-2*c*x^n)/(b + Sqrt[b^2 - 4*a*c])]) - 4*a*c^2*Sqrt[b^2 - 4*a*c]*e*x^n*(a
 + x^n*(b + c*x^n))*(-((b + Sqrt[b^2 - 4*a*c])*Hypergeometric2F1[1, 1 + n^(-1), 2 + n^(-1), (2*c*x^n)/(-b + Sq
rt[b^2 - 4*a*c])]) + (b - Sqrt[b^2 - 4*a*c])*Hypergeometric2F1[1, 1 + n^(-1), 2 + n^(-1), (-2*c*x^n)/(b + Sqrt
[b^2 - 4*a*c])]) - 2*b*c^2*Sqrt[b^2 - 4*a*c]*d*n*x^n*(a + x^n*(b + c*x^n))*(-((b + Sqrt[b^2 - 4*a*c])*Hypergeo
metric2F1[1, 1 + n^(-1), 2 + n^(-1), (2*c*x^n)/(-b + Sqrt[b^2 - 4*a*c])]) + (b - Sqrt[b^2 - 4*a*c])*Hypergeome
tric2F1[1, 1 + n^(-1), 2 + n^(-1), (-2*c*x^n)/(b + Sqrt[b^2 - 4*a*c])]) + 4*a*c^2*Sqrt[b^2 - 4*a*c]*e*n*x^n*(a
 + x^n*(b + c*x^n))*(-((b + Sqrt[b^2 - 4*a*c])*Hypergeometric2F1[1, 1 + n^(-1), 2 + n^(-1), (2*c*x^n)/(-b + Sq
rt[b^2 - 4*a*c])]) + (b - Sqrt[b^2 - 4*a*c])*Hypergeometric2F1[1, 1 + n^(-1), 2 + n^(-1), (-2*c*x^n)/(b + Sqrt
[b^2 - 4*a*c])]) + 2*b^2*c*Sqrt[b^2 - 4*a*c]*d*(1 + n)*(a + x^n*(b + c*x^n))*(-((b + Sqrt[b^2 - 4*a*c])*Hyperg
eometric2F1[1, n^(-1), 1 + n^(-1), (2*c*x^n)/(-b + Sqrt[b^2 - 4*a*c])]) + (b - Sqrt[b^2 - 4*a*c])*Hypergeometr
ic2F1[1, n^(-1), 1 + n^(-1), (-2*c*x^n)/(b + Sqrt[b^2 - 4*a*c])]) - 4*a*c^2*Sqrt[b^2 - 4*a*c]*d*(1 + n)*(a + x
^n*(b + c*x^n))*(-((b + Sqrt[b^2 - 4*a*c])*Hypergeometric2F1[1, n^(-1), 1 + n^(-1), (2*c*x^n)/(-b + Sqrt[b^2 -
 4*a*c])]) + (b - Sqrt[b^2 - 4*a*c])*Hypergeometric2F1[1, n^(-1), 1 + n^(-1), (-2*c*x^n)/(b + Sqrt[b^2 - 4*a*c
])]) - 2*a*b*c*Sqrt[b^2 - 4*a*c]*e*(1 + n)*(a + x^n*(b + c*x^n))*(-((b + Sqrt[b^2 - 4*a*c])*Hypergeometric2F1[
1, n^(-1), 1 + n^(-1), (2*c*x^n)/(-b + Sqrt[b^2 - 4*a*c])]) + (b - Sqrt[b^2 - 4*a*c])*Hypergeometric2F1[1, n^(
-1), 1 + n^(-1), (-2*c*x^n)/(b + Sqrt[b^2 - 4*a*c])]) - 2*b^2*c*Sqrt[b^2 - 4*a*c]*d*n*(1 + n)*(a + x^n*(b + c*
x^n))*(-((b + Sqrt[b^2 - 4*a*c])*Hypergeometric2F1[1, n^(-1), 1 + n^(-1), (2*c*x^n)/(-b + Sqrt[b^2 - 4*a*c])])
 + (b - Sqrt[b^2 - 4*a*c])*Hypergeometric2F1[1, n^(-1), 1 + n^(-1), (-2*c*x^n)/(b + Sqrt[b^2 - 4*a*c])]) + 8*a
*c^2*Sqrt[b^2 - 4*a*c]*d*n*(1 + n)*(a + x^n*(b + c*x^n))*(-((b + Sqrt[b^2 - 4*a*c])*Hypergeometric2F1[1, n^(-1
), 1 + n^(-1), (2*c*x^n)/(-b + Sqrt[b^2 - 4*a*c])]) + (b - Sqrt[b^2 - 4*a*c])*Hypergeometric2F1[1, n^(-1), 1 +
 n^(-1), (-2*c*x^n)/(b + Sqrt[b^2 - 4*a*c])])))/(a*(b^2 - 4*a*c)^2*(-b + Sqrt[b^2 - 4*a*c])*(b + Sqrt[b^2 - 4*
a*c])*n*(1 + n)*(a + x^n*(b + c*x^n))))

________________________________________________________________________________________

Maple [F]  time = 0.053, size = 0, normalized size = 0. \begin{align*} \int{\frac{d+e{x}^{n}}{ \left ( a+b{x}^{n}+c{x}^{2\,n} \right ) ^{2}}}\, dx \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((d+e*x^n)/(a+b*x^n+c*x^(2*n))^2,x)

[Out]

int((d+e*x^n)/(a+b*x^n+c*x^(2*n))^2,x)

________________________________________________________________________________________

Maxima [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \frac{{\left (b c d - 2 \, a c e\right )} x x^{n} +{\left (b^{2} d -{\left (2 \, c d + b e\right )} a\right )} x}{a^{2} b^{2} n - 4 \, a^{3} c n +{\left (a b^{2} c n - 4 \, a^{2} c^{2} n\right )} x^{2 \, n} +{\left (a b^{3} n - 4 \, a^{2} b c n\right )} x^{n}} + \int \frac{b^{2} d{\left (n - 1\right )} -{\left (2 \, c d{\left (2 \, n - 1\right )} - b e\right )} a +{\left (b c d{\left (n - 1\right )} - 2 \, a c e{\left (n - 1\right )}\right )} x^{n}}{a^{2} b^{2} n - 4 \, a^{3} c n +{\left (a b^{2} c n - 4 \, a^{2} c^{2} n\right )} x^{2 \, n} +{\left (a b^{3} n - 4 \, a^{2} b c n\right )} x^{n}}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d+e*x^n)/(a+b*x^n+c*x^(2*n))^2,x, algorithm="maxima")

[Out]

((b*c*d - 2*a*c*e)*x*x^n + (b^2*d - (2*c*d + b*e)*a)*x)/(a^2*b^2*n - 4*a^3*c*n + (a*b^2*c*n - 4*a^2*c^2*n)*x^(
2*n) + (a*b^3*n - 4*a^2*b*c*n)*x^n) + integrate((b^2*d*(n - 1) - (2*c*d*(2*n - 1) - b*e)*a + (b*c*d*(n - 1) -
2*a*c*e*(n - 1))*x^n)/(a^2*b^2*n - 4*a^3*c*n + (a*b^2*c*n - 4*a^2*c^2*n)*x^(2*n) + (a*b^3*n - 4*a^2*b*c*n)*x^n
), x)

________________________________________________________________________________________

Fricas [F]  time = 0., size = 0, normalized size = 0. \begin{align*}{\rm integral}\left (\frac{e x^{n} + d}{c^{2} x^{4 \, n} + b^{2} x^{2 \, n} + 2 \, a b x^{n} + a^{2} + 2 \,{\left (b c x^{n} + a c\right )} x^{2 \, n}}, x\right ) \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d+e*x^n)/(a+b*x^n+c*x^(2*n))^2,x, algorithm="fricas")

[Out]

integral((e*x^n + d)/(c^2*x^(4*n) + b^2*x^(2*n) + 2*a*b*x^n + a^2 + 2*(b*c*x^n + a*c)*x^(2*n)), x)

________________________________________________________________________________________

Sympy [F(-1)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d+e*x**n)/(a+b*x**n+c*x**(2*n))**2,x)

[Out]

Timed out

________________________________________________________________________________________

Giac [F]  time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{e x^{n} + d}{{\left (c x^{2 \, n} + b x^{n} + a\right )}^{2}}\,{d x} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((d+e*x^n)/(a+b*x^n+c*x^(2*n))^2,x, algorithm="giac")

[Out]

integrate((e*x^n + d)/(c*x^(2*n) + b*x^n + a)^2, x)